<html>
<head><meta charset="utf-8"><title>Looking for help with  rust/#64685 link-dead-code bug · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Looking.20for.20help.20with.20.20rust.2F.2364685.20link-dead-code.20bug.html">Looking for help with  rust/#64685 link-dead-code bug</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216517986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Looking%20for%20help%20with%20%20rust/%2364685%20link-dead-code%20bug/near/216517986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> xd009642 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Looking.20for.20help.20with.20.20rust.2F.2364685.20link-dead-code.20bug.html#216517986">(Nov 12 2020 at 19:46)</a>:</h4>
<p>I was hoping to tackle this issue as it's been impacting me (indirectly) since some point in 2018 (although it look longer for me to find what causes it and raise the rust issue). <a href="https://github.com/rust-lang/rust/issues/64685">https://github.com/rust-lang/rust/issues/64685</a> just wondered if anyone had thoughts on how to solve this or could point me in the right direction <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="216519547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Looking%20for%20help%20with%20%20rust/%2364685%20link-dead-code%20bug/near/216519547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Looking.20for.20help.20with.20.20rust.2F.2364685.20link-dead-code.20bug.html#216519547">(Nov 12 2020 at 20:00)</a>:</h4>
<p>not sure if it helps, but the <code>-Wl,--as-needed</code> line is being added in <code>compiler/rustc_target/src/spec</code></p>



<a name="216519661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Looking%20for%20help%20with%20%20rust/%2364685%20link-dead-code%20bug/near/216519661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Looking.20for.20help.20with.20.20rust.2F.2364685.20link-dead-code.20bug.html#216519661">(Nov 12 2020 at 20:01)</a>:</h4>
<p>also, <a href="https://rustc-dev-guide.rust-lang.org/">https://rustc-dev-guide.rust-lang.org/</a> is generally helpful if you haven't worked with the compiler before</p>



<a name="216521334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Looking%20for%20help%20with%20%20rust/%2364685%20link-dead-code%20bug/near/216521334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> xd009642 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Looking.20for.20help.20with.20.20rust.2F.2364685.20link-dead-code.20bug.html#216521334">(Nov 12 2020 at 20:14)</a>:</h4>
<p>Hmm I think that looks roughly the right place, but I think I probably need to go to one of the places those <code>TargetOptions</code> are used and combined with <code>-C link-dead-code</code> <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span> I'll probably get to looking at this at the weekend. And I've done one PR before but the guide is always appreciated <span aria-label="big smile" class="emoji emoji-1f604" role="img" title="big smile">:big_smile:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>